/*
 * @Author: atony2099
 * @Date: 2019-02-14 16:50:31
 * @Last Modified by: atony2099
 * @Last Modified time: 2019-02-15 11:11:50
 */

'use strict';

module.exports = app => {
  const { sign, user } = app.controller;
  const router = app.router.namespace('/app/v1');
  const { validate } = app.middlewares;

  // about user
  router.post('/user/login', user.login);
  router.get('/user/me', validate(), user.user);
  router.post('/user/reset', validate(), user.resetUser);

  // about sign
  router.post('/sign', validate(), sign.index);
};
